package com.IO.IODemo01;

import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.util.Date;

public class A08Copy {
    public static void main(String[] args) throws IOException {
        FileInputStream fis = new FileInputStream("D:\\TestFile\\Copy\\A\\test.mp4");
        FileOutputStream fos = new FileOutputStream("D:\\TestFile\\Copy\\B\\Best.mp4");
        long date = System.nanoTime();
        int n;
        while ((n = fis.read()) != -1) {
            fos.write(n);
        }
        long time = System.nanoTime();
        System.out.println("复制完成，用时：" + (time - date) / 1000000 + "ms");
        fis.close();
        fos.close();
    }
}
